﻿using BeetleX.FastHttpApi;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace JTParcrelHelper
{
    
    public partial class Form1 : Form
    {
        private BeetleX.FastHttpApi.HttpApiServer mHttpApiServer;
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                HttpApiServer httpApiServer = new BeetleX.FastHttpApi.HttpApiServer();
               
                httpApiServer.Options.LogToConsole = true;//日志输出到命令行
                httpApiServer.Options.LogLevel = BeetleX.EventArgs.LogType.Debug;//日志输出级别
                httpApiServer.Options.Port = 8866;//监听端口
                httpApiServer.Register(typeof(BarcodeDelay.Program).Assembly);
                httpApiServer.Open();
                Console.Write(httpApiServer.BaseServer);
                Console.Read();
            }
            catch(Exception ex)
            {
               
            }
        }
    }
}
